﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Iworld.Toolkit.Converter
{
    /// <summary>
    /// 翻转布尔值
    /// </summary>
    public class ReverseBoolConverter : ConverterBase<bool?, bool?>
    {

        protected override bool? ConvertNotNull(bool? value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return value == true ? false : true;
        }

        protected override bool? ConvertBackNotNull(bool? value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return value == true ? false : true;
        }
    }
}
